home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 701-725 / 708 / intuisup / intuisup42.lha / Intuisup / source.lha / Library / intuisup.h < prev    next >
C/C++ Source or Header  |  1992-06-21  |  26KB  |  543 lines

  1. /* $Revision Header *** Header built automatically - do not edit! ***********
  2.  *
  3.  *    (C) Copyright 1991 by Torsten Jürgeleit
  4.  *
  5.  *    Name .....: intuisup.h
  6.  *    Created ..: Sunday 22-Dec-91 20:34:40
  7.  *    Revision .: 8
  8.  *
  9.  *    Date        Author                 Comment
  10.  *    =========   ====================   ====================
  11.  *    21-Jun-92   Torsten Jürgeleit      check for compiler and define
  12.  *                                         differences
  13.  *    03-Jun-92   Torsten Jürgeleit      alternate color for menu item texts
  14.  *    14-Apr-92   Torsten Jürgeleit      neq flag GADGET_DATA_FLAG_NO_CLEAR
  15.  *    12-May-92   Torsten Jürgeleit      text colors for IClearWindow()
  16.  *    30-Apr-92   Torsten Jürgeleit      rasters for IClearWindow() and
  17.  *                                         requesters
  18.  *    01-Apr-92   Torsten Jürgeleit      changed parameter size of
  19.  *                                         IModifyGadget() for new value of
  20.  *                                         USE_CURRENT_VALUE (1L << 31)
  21.  *    31-Mar-92   Torsten Jürgeleit      changed USE_CURRENT_VALUE from ~0L
  22.  *                                         to (1L << 31)
  23.  *    21-Mar-92   Torsten Jürgeleit      flags for converting numbers with
  24.  *                                         string gadgets
  25.  *    22-Dec-91   Torsten Jürgeleit      Created this file!
  26.  *
  27.  ****************************************************************************
  28.  *
  29.  *    Includes, defines, structures, prototypes and pragmas for IntuiSup
  30.  *    library
  31.  *
  32.  * $Revision Header ********************************************************/
  33.  
  34. #ifndef    LIBRARIES_INTUISUP_H
  35. #define    LIBRARIES_INTUISUP_H
  36.  
  37.     /* Includes */
  38.  
  39. #ifndef    EXEC_TYPES_H
  40. #include <exec/types.h>
  41. #endif    /* EXEC_TYPES_H */
  42.  
  43. #ifndef    EXEC_LISTS_H
  44. #include <exec/lists.h>
  45. #endif    /* EXEC_LISTS_H */
  46.  
  47. #ifndef    LIBRARIES_DISKFONT_H
  48. #include <libraries/diskfont.h>
  49. #endif    /* LIBRARIES_DISKFONT_H */
  50.  
  51. #ifndef    INTUITION_INTUITION_H
  52. #include <intuition/intuition.h>
  53. #endif    /* INTUITION_INTUITION_H */
  54.  
  55.     /* Check for compiler and define the differences */
  56.  
  57. #ifdef    AZTEC_C
  58. #ifndef    __VERSION
  59. #define __VERSION 360
  60. #endif    /* __VERSION */
  61. #if    __VERSION < 500
  62. #define __NO_PRAGMAS
  63. #define __NO_PROTOTYPES
  64. #endif    /* __VERSION */
  65. #define C_Args
  66. #endif    /* AZTEC_C */
  67.  
  68. #ifdef    LATTICE
  69. #define    C_Args    __stdargs
  70. #endif    /* LATTICE */
  71.  
  72. #ifdef    DICE
  73. #define    __NO_PRAGMAS
  74. #define    C_Args
  75. #endif    /* DICE */
  76.  
  77.     /* Defines for library */
  78.  
  79. #define IntuiSupName        "intuisup.library"
  80. #define IntuiSupVersion        4L
  81.  
  82.     /* Defines for render */
  83.  
  84. #define RENDER_INFO_FLAG_INNER_WINDOW        (USHORT)(1 << 0)    /* use upper left corner of inner window as location (0,0) */
  85. #define RENDER_INFO_FLAG_BACK_FILL        (USHORT)(1 << 1)    /* fill window back ground with different color */
  86. #define RENDER_INFO_FLAG_AVAIL_FONTS        (USHORT)(1 << 2)    /* scan available fonts and use this list for IAskFont/IOpenFont */
  87.  
  88. #define INTUISUP_DATA_END    (USHORT)0       /* mark end of data arry */
  89.  
  90. #define ISUP_ID        ((ULONG)'I' << 24 | (ULONG)'S' << 16 | 'U' << 8 | 'P')
  91.  
  92.     /* Defines for open window flags */
  93.  
  94. #define OPEN_WINDOW_FLAG_CENTER_WINDOW        (USHORT)(1 << 0)    /* center window on screen */
  95. #define OPEN_WINDOW_FLAG_RENDER_PENS        (USHORT)(1 << 1)    /* use render pens for detail and backfill pen */
  96.  
  97.     /* Defines for clear window flags */
  98.  
  99. #define CLEAR_WINDOW_FLAG_CUSTOM_DRAW_MODE    (1 << 0)   /* don't change draw mode */
  100. #define CLEAR_WINDOW_FLAG_CUSTOM_COLOR        (1 << 1)   /* don't change background color */
  101. #define CLEAR_WINDOW_FLAG_NORMAL_COLOR        (1 << 2)   /* use normal background color */
  102. #define CLEAR_WINDOW_FLAG_USE_RASTER        (1 << 3)   /* use standard raster for window background */
  103. #define CLEAR_WINDOW_FLAG_ABSOLUTE_POS        (1 << 4)   /* don't add window border offset to given upper left position */
  104. #define CLEAR_WINDOW_FLAG_TEXT1_COLOR        (1 << 5)   /* use text color 1 */
  105. #define CLEAR_WINDOW_FLAG_TEXT2_COLOR        (1 << 6)   /* use text color 2 */
  106.  
  107.     /* Defines for texts */
  108.  
  109. #define TEXT_DATA_TYPE_TEXT            (USHORT)1
  110. #define TEXT_DATA_TYPE_NUM_UNSIGNED_DEC        (USHORT)2
  111. #define TEXT_DATA_TYPE_NUM_SIGNED_DEC        (USHORT)3
  112. #define TEXT_DATA_TYPE_NUM_HEX            (USHORT)4
  113. #define TEXT_DATA_TYPE_NUM_BIN            (USHORT)5
  114.  
  115. #define TEXT_DATA_FLAG_BOLD            (USHORT)(1 << 0)
  116. #define TEXT_DATA_FLAG_ITALIC            (USHORT)(1 << 1)
  117. #define TEXT_DATA_FLAG_UNDERLINED        (USHORT)(1 << 2)
  118. #define TEXT_DATA_FLAG_ABSOLUTE_POS        (USHORT)(1 << 3)    /* absolute text pos given - don't add border offsets */
  119. #define TEXT_DATA_FLAG_CENTER            (USHORT)(1 << 4)    /* center text with in window width */
  120. #define TEXT_DATA_FLAG_PLACE_LEFT        (USHORT)(1 << 5)    /* place text left of given left edge */
  121. #define TEXT_DATA_FLAG_COLOR2            (USHORT)(1 << 6)    /* use 2nd text render pen */
  122. #define TEXT_DATA_FLAG_COMPLEMENT        (USHORT)(1 << 7)    /* use complement of front and back pen */
  123. #define TEXT_DATA_FLAG_BACK_FILL        (USHORT)(1 << 8)    /* use draw mode JAM2 to fill text background with ri_BackPen */
  124. #define TEXT_DATA_FLAG_NO_PRINT            (USHORT)(1 << 9)    /* don't print text - only calc width */
  125. #define TEXT_DATA_FLAG_NUM_IDENTIFIER        (USHORT)(1 << 10)    /* convert number with normal (assmebler style) leading identifier `$' or `%' */
  126. #define TEXT_DATA_FLAG_NUM_C_STYLE        (USHORT)(1 << 11)    /* use C style identifier `0x' for hex numbers */
  127. #define TEXT_DATA_FLAG_NUM_LEADING_ZEROES    (USHORT)(1 << 12)    /* convert number includeing leading zeroes */
  128. #define TEXT_DATA_FLAG_NUM_UPPER_CASE        (USHORT)(1 << 13)    /* use upper case characters for hex number */
  129.  
  130. #define CONVERT_FLAG_IDENTIFIER            (USHORT)(1 << 0)    /* convert number with normal (assmebler style) leading identifier `$' or `%' */
  131. #define CONVERT_FLAG_C_STYLE            (USHORT)(1 << 1)    /* use C style identifier `0x' for hex numbers */
  132. #define CONVERT_FLAG_LEADING_ZEROES        (USHORT)(1 << 2)    /* convert number includeing leading zeroes */
  133. #define CONVERT_FLAG_UPPER_CASE            (USHORT)(1 << 3)    /* use upper case characters for hex number */
  134.  
  135.     /* Structures for texts */
  136.  
  137. struct TextData {
  138.     USHORT    td_Type;
  139.     USHORT    td_Flags;
  140.     SHORT    td_LeftEdge;
  141.     SHORT    td_TopEdge;
  142.     BYTE    *td_Text;
  143.     struct TextAttr  *td_TextAttr;
  144. };
  145.     /* Defines for borders */
  146.  
  147. #define BORDER_DATA_TYPE_BOX1_OUT    (USHORT)1
  148. #define BORDER_DATA_TYPE_BOX1_IN    (USHORT)2
  149. #define BORDER_DATA_TYPE_BOX2_OUT    (USHORT)3
  150. #define BORDER_DATA_TYPE_BOX2_IN    (USHORT)4
  151.  
  152.     /* Structures for borders */
  153.  
  154. struct BorderData {
  155.     USHORT    bd_Type;
  156.     SHORT    bd_LeftEdge;
  157.     SHORT    bd_TopEdge;
  158.     USHORT    bd_Width;
  159.     USHORT    bd_Height;
  160. };
  161.     /* Defines for gadgets */
  162.  
  163. #define GADGET_DATA_TYPE_BUTTON        (USHORT)1    /* button gadget */
  164. #define GADGET_DATA_TYPE_CHECK        (USHORT)2    /* checkbox gadget */
  165. #define GADGET_DATA_TYPE_MX        (USHORT)3    /* mutual exclude gadget */
  166. #define GADGET_DATA_TYPE_STRING        (USHORT)4    /* string input gadget */
  167. #define GADGET_DATA_TYPE_INTEGER    (USHORT)5    /* integer input gadget */
  168. #define GADGET_DATA_TYPE_SLIDER        (USHORT)6    /* slider gadget */
  169. #define GADGET_DATA_TYPE_SCROLLER    (USHORT)7    /* scroller gadget */
  170. #define GADGET_DATA_TYPE_CYCLE        (USHORT)8    /* cycle gadget */
  171. #define GADGET_DATA_TYPE_COUNT        (USHORT)9    /* count gadget */
  172. #define GADGET_DATA_TYPE_LISTVIEW    (USHORT)10    /* list view gadget */
  173. #define GADGET_DATA_TYPE_PALETTE    (USHORT)11    /* palette gadget */
  174.  
  175. #define GADGET_DATA_FLAG_DISABLED        (1L << 0)    /* gadget disabled (ghosted) - default enabled */
  176. #define GADGET_DATA_FLAG_NO_BORDER        (1L << 1)    /* no gadget border - default with border */
  177. #define GADGET_DATA_FLAG_HIGH_COMP        (1L << 2)    /* highliting by complement - default by select border */
  178. #define GADGET_DATA_FLAG_ORIENTATION_VERT    (1L << 3)    /* vertical orientation - default horizontal */
  179. #define GADGET_DATA_FLAG_HOTKEY            (1L << 4)    /* hotkey given - default none */
  180. #define GADGET_DATA_FLAG_NO_TEXT_OUTPUT        (1L << 5)    /* no text output, but scan gadget text for hotkey */
  181. #define GADGET_DATA_FLAG_TEXT_LEFT        (1L << 6)    /* place text left of gadget */
  182. #define GADGET_DATA_FLAG_TEXT_RIGHT        (1L << 7)    /* place text right of gadget */
  183. #define GADGET_DATA_FLAG_TEXT_ABOVE        (1L << 8)    /* place text above of gadget */
  184. #define GADGET_DATA_FLAG_TEXT_BELOW        (1L << 9)    /* place text below of gadget */
  185. #define GADGET_DATA_FLAG_TEXT_COLOR2        (1L << 10)    /* use 2nd text render pen for gadget text */
  186. #define GADGET_DATA_FLAG_BUTTON_TOGGLE        (1L << 11)    /* button gadgets: toggle button - default no toggle */
  187. #define GADGET_DATA_FLAG_BUTTON_IMAGE        (1L << 12)    /* button gadgets: render image - default no image */
  188. #define GADGET_DATA_FLAG_INPUT_AUTO_ACTIVATE    (1L << 13)    /* input gadgets: acivate after GADGETUP next or previous input gadget */
  189. #define GADGET_DATA_FLAG_STRING_UNSIGNED_DEC    (1L << 14)    /* string gadgets: input default no pointer to string but an unsigned decimal number */
  190. #define GADGET_DATA_FLAG_STRING_SIGNED_DEC    (1L << 15)    /* string gadgets: input default no pointer to string but an signed decimal number */
  191. #define GADGET_DATA_FLAG_STRING_HEX        (1L << 16)    /* string gadgets: input default no pointer to string but an hex number */
  192. #define GADGET_DATA_FLAG_STRING_BIN        (1L << 17)    /* string gadgets: input default no pointer to string but an binary number */
  193. #define GADGET_DATA_FLAG_SCROLLER_NO_ARROWS    (1L << 18)    /* scroller gadget: no arrows - default with arrows */
  194. #define GADGET_DATA_FLAG_COUNT_SIGNED_DEC    (1L << 19)    /* count gadget: signed dec - default unsigned dec */
  195. #define GADGET_DATA_FLAG_LISTVIEW_READ_ONLY    (1L << 20)    /* list view gadget: read only - default selection enabled */
  196. #define GADGET_DATA_FLAG_LISTVIEW_SHOW_SELECTED (1L << 21)    /* list view gadget: show last selected entry - default no */
  197. #define GADGET_DATA_FLAG_PALETTE_NO_INDICATOR    (1L << 22)    /* palette gadget: no current color indicator - default with indicator */
  198. #define GADGET_DATA_FLAG_PALETTE_INDICATOR_TOP    (1L << 23)    /* palette gadget: place indicator at top - default at left */
  199. #define GADGET_DATA_FLAG_MOVE_POINTER        (1L << 24)    /* move mouse pointer to center of this gadget */
  200. #define GADGET_DATA_FLAG_NO_CLEAR        (1L << 25)    /* don't clear area occupied by this gadget before drawing */
  201.  
  202. #define GADGET_IDCMP_FLAGS_BUTTON    (GADGETUP | VANILLAKEY)
  203. #define GADGET_IDCMP_FLAGS_CHECK    (GADGETDOWN | VANILLAKEY)
  204. #define GADGET_IDCMP_FLAGS_MX        (GADGETDOWN | VANILLAKEY)
  205. #define GADGET_IDCMP_FLAGS_STRING    (GADGETUP | VANILLAKEY)
  206. #define GADGET_IDCMP_FLAGS_INTEGER    (GADGETUP | VANILLAKEY)
  207. #define GADGET_IDCMP_FLAGS_SLIDER    (GADGETUP | MOUSEMOVE | VANILLAKEY)
  208. #define GADGET_IDCMP_FLAGS_SCROLLER    (GADGETDOWN | GADGETUP | MOUSEMOVE | INTUITICKS | VANILLAKEY)
  209. #define GADGET_IDCMP_FLAGS_CYCLE    (GADGETUP | VANILLAKEY)
  210. #define GADGET_IDCMP_FLAGS_COUNT    (GADGETDOWN | GADGETUP | MOUSEMOVE | VANILLAKEY)
  211. #define GADGET_IDCMP_FLAGS_LISTVIEW    (GADGETDOWN | GADGETUP | MOUSEMOVE | INTUITICKS | VANILLAKEY)
  212. #define GADGET_IDCMP_FLAGS_PALETTE    (GADGETUP | VANILLAKEY)
  213. #define GADGET_IDCMP_FLAGS_ALL        (GADGETDOWN | GADGETUP | MOUSEMOVE | INTUITICKS | VANILLAKEY)
  214.  
  215. #define INPUT_AUTO_ACTIVATE(next,prev)    ((((LONG)next) << 16) | prev)    /* macro for (gd_InputActivateNext | gd_InpuActivatePrev) */
  216.  
  217. #define USE_CURRENT_VALUE    (1L << 31)    /* used for set_gadget_attributes() to indicate data for which to use the current value */
  218.  
  219.     /* Structures for gadgets */
  220.  
  221. struct GadgetData {
  222.     ULONG    gd_Type;
  223.     ULONG    gd_Flags;
  224.     USHORT    gd_LeftEdge;
  225.     USHORT    gd_TopEdge;
  226.     USHORT    gd_Width;
  227.     USHORT    gd_Height;
  228.     BYTE    *gd_Text;
  229.     struct TextAttr  *gd_TextAttr;
  230.     union    {
  231.         struct {    /* standard data struct */
  232.         LONG    gd_Data1;
  233.         LONG    gd_Data2;
  234.         VOID    *gd_Data3;
  235.         } gd_Data;
  236.         struct {    /* for button gadgets */
  237.         ULONG    gd_ButtonSelected;        /* selection state for toggle buttons - ZERO = unselected, non ZERO = selected */
  238.         struct Image  *gd_ButtonNormalRender;    /* normal render image */
  239.         struct Image  *gd_ButtonSelectRender;    /* select render image */
  240.         } gd_ButtonData;
  241.         struct {    /* for check gadgets */
  242.         ULONG    gd_CheckSelected;    /* selection state - ZERO = unselected, non ZERO = selected */
  243.         ULONG    gd_CheckPad1;
  244.         ULONG    gd_CheckPad2;
  245.         } gd_CheckData;
  246.         struct {    /* for mutual exclude gadgets */
  247.         ULONG    gd_MXSpacing;        /* pixel spacing between MX gadgets */
  248.         ULONG    gd_MXActiveEntry;    /* num of active entry from text array */
  249.         BYTE    **gd_MXTextArray;    /* ptr to MX text ptr array */
  250.         } gd_MXData;
  251.         struct {    /* for string and integer gadgets */
  252.         ULONG    gd_InputLen;        /* len of input buffer */
  253.         USHORT    gd_InputActivateNext;    /* num of next string/num gadget to activate */
  254.         USHORT    gd_InputActivatePrev;    /* num of previous string/num gadget to activate */
  255.         BYTE    *gd_InputDefault;    /* string: default text [syntax: "text"] */
  256.                         /* integer: default number [syntax: (VOID *)num] */
  257.         } gd_InputData;
  258.         struct {    /* for slider gadgets */
  259.         LONG    gd_SliderMin;        /* min level */
  260.         LONG    gd_SliderMax;        /* max level */
  261.         LONG    gd_SliderLevel;        /* current slider level */
  262.         } gd_SliderData;
  263.         struct {    /* for scroller gadgets */
  264.         ULONG    gd_ScrollerVisible;    /* visible entries */
  265.         ULONG    gd_ScrollerTotal;    /* total entries */
  266.         ULONG    gd_ScrollerTop;        /* current top entry */
  267.         } gd_ScrollerData;
  268.         struct {    /* for cycle gadget */
  269.         ULONG    gd_CycleSpacing;    /* pixel spacing between pop up cycle list entries */
  270.         ULONG    gd_CycleActive;        /* num of current cycle text ptr array entry */
  271.         BYTE    **gd_CycleTextArray;    /* ptr to cycle text ptr array */
  272.         } gd_CycleData;
  273.         struct {    /* for count gadget */
  274.         ULONG    gd_CountMin;        /* min value */
  275.         ULONG    gd_CountMax;        /* max value */
  276.         ULONG    gd_CountValue;    /* current count value */
  277.         } gd_CountData;
  278.         struct {    /* for list view gadget */
  279.         ULONG    gd_ListViewSpacing;    /* pixel spacing between list view entries */
  280.         ULONG    gd_ListViewTop;        /* current top entry */
  281.         struct List  *gd_ListViewList;    /* current list ptr */
  282.         } gd_ListViewData;
  283.         struct {    /* for palette gadget */
  284.         ULONG    gd_PaletteDepth;    /* num of bitplanes for palette */
  285.         ULONG    gd_PaletteColorOffset;    /* first color of palette */
  286.         ULONG    gd_PaletteActiveColor;    /* selected color */
  287.         } gd_PaletteData;
  288.     } gd_SpecialData;
  289. };
  290.     /* Defines for auto request */
  291.  
  292. #define AUTO_REQ_FLAG_BACK_FILL        (USHORT)(1 << 0)
  293. #define AUTO_REQ_FLAG_RENDER_PENS    (USHORT)(1 << 1)
  294. #define AUTO_REQ_FLAG_TEXT_CENTER    (USHORT)(1 << 2)
  295. #define AUTO_REQ_FLAG_TEXT_COLOR2    (USHORT)(1 << 3)
  296. #define AUTO_REQ_FLAG_HOTKEY        (USHORT)(1 << 4)
  297. #define AUTO_REQ_FLAG_BEEP        (USHORT)(1 << 5)
  298. #define AUTO_REQ_FLAG_MOVE_POINTER_POS    (USHORT)(1 << 6)
  299. #define AUTO_REQ_FLAG_MOVE_POINTER_NEG    (USHORT)(1 << 7)
  300. #define AUTO_REQ_FLAG_DRAW_RASTER    (USHORT)(1 << 8)    /* draw raster around text area */
  301.  
  302.     /* Defines for requester */
  303.  
  304. #define REQ_DATA_FLAG_BACK_FILL        (1L << 0)
  305. #define REQ_DATA_FLAG_RENDER_PENS    (1L << 1)
  306. #define REQ_DATA_FLAG_INNER_WINDOW    (1L << 2)
  307. #define REQ_DATA_FLAG_AVAIL_FONTS    (1L << 3)
  308. #define REQ_DATA_FLAG_CENTER        (1L << 4)
  309. #define REQ_DATA_FLAG_DRAG_GADGET    (1L << 5)
  310. #define REQ_DATA_FLAG_DEPTH_GADGET    (1L << 6)
  311. #define REQ_DATA_FLAG_DRAW_RASTER    (1L << 7)    /* draw raster between FIRST BORDER and window border - FIRST BORDER will not be used further */
  312.  
  313.     /* Structures for requester */
  314.  
  315. struct RequesterData {
  316.     SHORT    rd_LeftEdge;
  317.     SHORT    rd_TopEdge;
  318.     SHORT    rd_Width;
  319.     SHORT    rd_Height;
  320.     ULONG    rd_Flags;
  321.     BYTE    *rd_Title;
  322.     struct TextData    *rd_Texts;
  323.     struct BorderData  *rd_Borders;
  324.     struct GadgetData  *rd_Gadgets;
  325. };
  326.     /* Defines for menus */
  327.  
  328. #define MENU_DATA_TYPE_TITLE        (USHORT)1
  329. #define MENU_DATA_TYPE_ITEM        (USHORT)2
  330. #define MENU_DATA_TYPE_SUBITEM        (USHORT)3
  331.  
  332. #define MENU_DATA_FLAG_DISABLED        (USHORT)(1 << 0)    /* disable menu or menu item */
  333. #define MENU_DATA_FLAG_ATTRIBUTE    (USHORT)(1 << 1)    /* attribute menu item */
  334. #define MENU_DATA_FLAG_SELECTED        (USHORT)(1 << 2)    /* selected attribute menu item */
  335. #define MENU_DATA_FLAG_EMPTY_LINE    (USHORT)(1 << 3)    /* insert empty line before this item */
  336. #define MENU_DATA_FLAG_HIGH_NONE    (USHORT)(1 << 4)    /* no highliting */
  337. #define MENU_DATA_FLAG_HIGH_BOX        (USHORT)(1 << 5)    /* highliting with box, otherwise with complement */
  338. #define MENU_DATA_FLAG_TEXT_COLOR2    (USHORT)(1 << 6)    /* alternate color for item text */
  339.  
  340.     /* Structures for menus */
  341.  
  342. struct MenuData {
  343.     USHORT    md_Type;
  344.     USHORT    md_Flags;
  345.     BYTE    *md_Name;
  346.     BYTE    *md_CommandKey;
  347.     ULONG    md_MutualExclude;
  348. };
  349.     /* Defines for text file */
  350.  
  351. #define TEXT_FILE_FLAG_TRIM_LINE        (USHORT)(1 << 0)    /* strip leading and trailing white space */
  352. #define TEXT_FILE_FLAG_SKIP_COMMENTS        (USHORT)(1 << 1)    /* skip C style comments */
  353. #define TEXT_FILE_FLAG_SKIP_EMPTY_LINES        (USHORT)(1 << 2)    /* skip empty lines */
  354. #define TEXT_FILE_FLAG_LINE_CONTINUATION    (USHORT)(1 << 3)    /* continue line with last character '\' in next line */
  355.  
  356. #define TEXT_FILE_STATUS_NORMAL            (SHORT)0
  357. #define TEXT_FILE_STATUS_EOF            (SHORT)1
  358.  
  359. #define TEXT_FILE_ERROR_NO_FILE_DATA        (SHORT)-1
  360. #define TEXT_FILE_ERROR_LINE_TOO_LONG        (SHORT)-2
  361. #define TEXT_FILE_ERROR_NO_COMMENT_END        (SHORT)-3
  362. #define TEXT_FILE_ERROR_READ_FAILED        (SHORT)-4
  363.  
  364.     /* Structures for text file */
  365.  
  366. struct FileData {
  367.     BYTE    *fd_Line;
  368.     USHORT    fd_LineLen;
  369.     USHORT    fd_LineNum;
  370. };
  371.     /* Structures for mouse pointer */
  372.  
  373. struct PointerData {
  374.     UBYTE    pd_Width;
  375.     UBYTE    pd_Height;
  376.     BYTE    pd_XOffset;
  377.     BYTE    pd_YOffset;
  378.     UWORD    *pd_Data;
  379. };
  380.  
  381.     /* Turn off prototypes if compiler does not handle them */
  382.  
  383. #ifdef    __NO_PROTOTYPES
  384. #define    __PARMS(x)    ()
  385. #else
  386. #define    __PARMS(x)    x
  387. #endif    /* __NO_PROTOTYPES */
  388.  
  389.     /* Prototypes */
  390.  
  391. APTR            IGetRenderInfo        __PARMS( (struct Screen  *screen, USHORT flags) );
  392. VOID            IFreeRenderInfo        __PARMS( (APTR ri) );
  393. struct Window        *IOpenWindow        __PARMS( (APTR ri, struct NewWindow  *nw, USHORT flags) );
  394. VOID            IClearWindow        __PARMS( (APTR ri, struct Window  *win, USHORT left_edge, USHORT top_edge, USHORT width, USHORT height, USHORT flags) );
  395. VOID            ICloseWindow        __PARMS( (struct Window  *win, BOOL more_windows) );
  396. struct AvailFontsHeader    *IAvailFonts        __PARMS( (APTR ri) );
  397. struct TextAttr        *IAskFont        __PARMS( (APTR ri, struct TextAttr  *ta) );
  398. struct TextFont        *IOpenFont        __PARMS( (APTR ri, struct TextAttr  *ta) );
  399.  
  400. VOID            IDisplayTexts        __PARMS( (APTR ri, struct Window  *win, struct TextData  *td, SHORT hoffset, SHORT voffset, BYTE **language_text_array) );
  401. USHORT            IPrintText        __PARMS( (APTR ri, struct Window  *win, BYTE *text, USHORT left_edge, USHORT top_edge, USHORT type, USHORT flags, struct TextAttr  *text_attr) );
  402. USHORT            IConvertUnsignedDec    __PARMS( (ULONG num, BYTE *buffer, USHORT flags) );
  403. USHORT            IConvertSignedDec    __PARMS( (LONG num, BYTE *buffer, USHORT flags) );
  404. USHORT            IConvertHex        __PARMS( (ULONG num, BYTE *buffer, USHORT flags) );
  405. USHORT            IConvertBin        __PARMS( (ULONG num, BYTE *buffer, USHORT flags) );
  406.  
  407. VOID            IDisplayBorders        __PARMS( (APTR ri, struct Window  *win, struct BorderData  *bd, SHORT hoffset, SHORT voffset) );
  408. VOID            IDrawBorder        __PARMS( (APTR ri, struct Window  *win, USHORT left_edge, USHORT top_edge, USHORT width, USHORT height, USHORT type) );
  409.  
  410. APTR            ICreateGadgets        __PARMS( (APTR ri, struct GadgetData  *gd, SHORT hoffset, SHORT voffset, BYTE **language_text_array) );
  411. VOID            IFreeGadgets        __PARMS( (APTR gl) );
  412. VOID            IDisplayGadgets        __PARMS( (struct Window  *win, APTR gl) );
  413. VOID            IRefreshGadgets        __PARMS( (APTR gl) );
  414. VOID            IModifyGadget        __PARMS( (APTR gl, USHORT data_entry, LONG left_edge, LONG top_edge, ULONG width, ULONG height) );
  415. ULONG            ISetGadgetAttributes    __PARMS( (APTR gl, USHORT data_entry, ULONG flag_mask, ULONG flag_bits, ULONG data1, ULONG data2, VOID *data3) );
  416. VOID            IActivateInputGadget    __PARMS( (APTR gl, USHORT data_entry) );
  417. struct Gadget        *IGadgetAddress        __PARMS( (APTR gl, USHORT data_entry) );
  418. struct Window        *IRemoveGadgets        __PARMS( (APTR gl) );
  419. struct IntuiMessage    *IGetMsg        __PARMS( (struct MsgPort  *uport) );
  420. VOID            IReplyMsg        __PARMS( (struct IntuiMessage  *imsg) );
  421.  
  422. BOOL            IAutoRequest        __PARMS( (struct Window  *req_win, BYTE *title, BYTE *body_text, BYTE *pos_text, BYTE *neg_text, LONG pos_idcmp_flags, LONG neg_idcmp_flags, USHORT req_flags, BYTE **language_text_array) );
  423. APTR            IDisplayRequester    __PARMS( (struct Window  *req_win, struct RequesterData  *rd, BYTE **language_text_array) );
  424. VOID            IRemoveRequester    __PARMS( (APTR rl) );
  425.  
  426. APTR            ICreateMenu        __PARMS( (APTR ri, struct Window  *win, struct MenuData  *md, struct TextAttr  *ta, BYTE **language_text_array) );
  427. VOID            IAttachMenu        __PARMS( (struct Window  *win, APTR ml) );
  428. struct MenuItem     *IMenuItemAddress    __PARMS( (APTR ml, USHORT menu_num) );
  429. struct Window       *IRemoveMenu        __PARMS( (APTR ml) );
  430. VOID            IFreeMenu        __PARMS( (APTR ml) );
  431.  
  432. struct FileData      *IOpenTextFile        __PARMS( (BYTE *name, USHORT read_buffer_size, USHORT line_buffer_size, USHORT flags) );
  433. SHORT            IReadTextLine        __PARMS( (struct FileData  *fd) );
  434. VOID            ICloseTextFile        __PARMS( (struct FileData  *fd) );
  435.  
  436. BYTE            **IBuildLanguageTextArray    __PARMS( (BYTE *name, USHORT entries) );
  437. BYTE            *IGetLanguageText    __PARMS( (BYTE *text, BYTE **text_array) );
  438. VOID            IFreeLanguageTextArray    __PARMS( (BYTE **text_array) );
  439.  
  440. VOID            IChangeMousePointer    __PARMS( (struct Window  *win, struct PointerData  *pd) );
  441. VOID            IRestoreMousePointer    __PARMS( (struct Window  *win) );
  442. VOID            IMoveMousePointer    __PARMS( (struct Window  *win, SHORT x, SHORT y, BOOL button) );
  443.  
  444.     /* Pragmas */
  445.  
  446. #ifndef    __NO_PRAGMAS
  447. #ifdef    AZTEC_C
  448. #pragma amicall(IntuiSupBase, 0x1e, IGetRenderInfo(a0,d0))
  449. #pragma amicall(IntuiSupBase, 0x24, IFreeRenderInfo(a0))
  450. #pragma amicall(IntuiSupBase, 0x2a, IOpenWindow(a0,a1,d0))
  451. #pragma amicall(IntuiSupBase, 0x30, IClearWindow(a0,a1,d0,d1,d2,d3,d4))
  452. #pragma amicall(IntuiSupBase, 0x36, ICloseWindow(a0,d0))
  453. #pragma amicall(IntuiSupBase, 0x3c, IAvailFonts(a0))
  454. #pragma amicall(IntuiSupBase, 0x42, IAskFont(a0,a1))
  455. #pragma amicall(IntuiSupBase, 0x48, IOpenFont(a0,a1))
  456. #pragma amicall(IntuiSupBase, 0x4e, IDisplayTexts(a0,a1,a2,d0,d1,a3))
  457. #pragma amicall(IntuiSupBase, 0x54, IPrintText(a0,a1,a2,d0,d1,d2,d3,a3))
  458. #pragma amicall(IntuiSupBase, 0x5a, IConvertUnsignedDec(d0,a0,d1))
  459. #pragma amicall(IntuiSupBase, 0x60, IConvertSignedDec(d0,a0,d1))
  460. #pragma amicall(IntuiSupBase, 0x66, IConvertHex(d0,a0,d1))
  461. #pragma amicall(IntuiSupBase, 0x6c, IConvertBin(d0,a0,d1))
  462. #pragma amicall(IntuiSupBase, 0x72, IDisplayBorders(a0,a1,a2,d0,d1))
  463. #pragma amicall(IntuiSupBase, 0x78, IDrawBorder(a0,a1,d0,d1,d2,d3,d4))
  464. #pragma amicall(IntuiSupBase, 0x7e, ICreateGadgets(a0,a1,d0,d1,a2))
  465. #pragma amicall(IntuiSupBase, 0x84, IFreeGadgets(a0))
  466. #pragma amicall(IntuiSupBase, 0x8a, IDisplayGadgets(a0,a1))
  467. #pragma amicall(IntuiSupBase, 0x90, IRefreshGadgets(a0))
  468. #pragma amicall(IntuiSupBase, 0x96, IModifyGadget(a0,d0,d1,d2,d3,d4))
  469. #pragma amicall(IntuiSupBase, 0x9c, ISetGadgetAttributes(a0,d0,d1,d2,d3,d4,a1))
  470. #pragma amicall(IntuiSupBase, 0xa2, IActivateInputGadget(a0,d0))
  471. #pragma amicall(IntuiSupBase, 0xa8, IGadgetAddress(a0,d0))
  472. #pragma amicall(IntuiSupBase, 0xae, IRemoveGadgets(a0))
  473. #pragma amicall(IntuiSupBase, 0xb4, IGetMsg(a0))
  474. #pragma amicall(IntuiSupBase, 0xba, IReplyMsg(a0))
  475. #pragma amicall(IntuiSupBase, 0xc0, IAutoRequest(a0,a1,a2,a3,d0,d1,d2,d3,d4))
  476. #pragma amicall(IntuiSupBase, 0xc6, IDisplayRequester(a0,a1,a2))
  477. #pragma amicall(IntuiSupBase, 0xcc, IRemoveRequester(a0))
  478. #pragma amicall(IntuiSupBase, 0xd2, ICreateMenu(a0,a1,a2,a3,d0))
  479. #pragma amicall(IntuiSupBase, 0xd8, IAttachMenu(a0,a1))
  480. #pragma amicall(IntuiSupBase, 0xde, IMenuItemAddress(a0,d0))
  481. #pragma amicall(IntuiSupBase, 0xe4, IRemoveMenu(a0))
  482. #pragma amicall(IntuiSupBase, 0xea, IFreeMenu(a0))
  483. #pragma amicall(IntuiSupBase, 0xf0, IOpenTextFile(a0,d0,d1,d2))
  484. #pragma amicall(IntuiSupBase, 0xf6, IReadTextLine(a0))
  485. #pragma amicall(IntuiSupBase, 0xfc, ICloseTextFile(a0))
  486. #pragma amicall(IntuiSupBase, 0x102, IBuildLanguageTextArray(a0,d0))
  487. #pragma amicall(IntuiSupBase, 0x108, IGetLanguageText(a0,a1))
  488. #pragma amicall(IntuiSupBase, 0x10e, IFreeLanguageTextArray(a0))
  489. #pragma amicall(IntuiSupBase, 0x114, IChangeMousePointer(a0,a1))
  490. #pragma amicall(IntuiSupBase, 0x11a, IRestoreMousePointer(a0))
  491. #pragma amicall(IntuiSupBase, 0x120, IMoveMousePointer(a0,d0,d1,d2))
  492. #else    /* AZTEC_C */
  493. #ifdef    LATTICE
  494. #pragma libcall IntuiSupBase IGetRenderInfo 1e 802
  495. #pragma libcall IntuiSupBase IFreeRenderInfo 24 801
  496. #pragma libcall IntuiSupBase IOpenWindow 2a 9803
  497. #pragma libcall IntuiSupBase IClearWindow 30 432109807
  498. #pragma libcall IntuiSupBase ICloseWindow 36 802
  499. #pragma libcall IntuiSupBase IAvailFonts 3c 801
  500. #pragma libcall IntuiSupBase IAskFont 42 9802
  501. #pragma libcall IntuiSupBase IOpenFont 48 9802
  502. #pragma libcall IntuiSupBase IDisplayTexts 4e b10a9806
  503. #pragma libcall IntuiSupBase IPrintText 54 b3210a9808
  504. #pragma libcall IntuiSupBase IConvertUnsignedDec 5a 18003
  505. #pragma libcall IntuiSupBase IConvertSignedDec 60 18003
  506. #pragma libcall IntuiSupBase IConvertHex 66 18003
  507. #pragma libcall IntuiSupBase IConvertBin 6c 18003
  508. #pragma libcall IntuiSupBase IDisplayBorders 72 10a9805
  509. #pragma libcall IntuiSupBase IDrawBorder 78 432109807
  510. #pragma libcall IntuiSupBase ICreateGadgets 7e a109805
  511. #pragma libcall IntuiSupBase IFreeGadgets 84 801
  512. #pragma libcall IntuiSupBase IDisplayGadgets 8a 9802
  513. #pragma libcall IntuiSupBase IRefreshGadgets 90 801
  514. #pragma libcall IntuiSupBase IModifyGadget 96 43210806
  515. #pragma libcall IntuiSupBase ISetGadgetAttributes 9c 943210807
  516. #pragma libcall IntuiSupBase IActivateInputGadget a2 802
  517. #pragma libcall IntuiSupBase IGadgetAddress a8 802
  518. #pragma libcall IntuiSupBase IRemoveGadgets ae 801
  519. #pragma libcall IntuiSupBase IGetMsg b4 801
  520. #pragma libcall IntuiSupBase IReplyMsg ba 801
  521. #pragma libcall IntuiSupBase IAutoRequest c0 43210ba9809
  522. #pragma libcall IntuiSupBase IDisplayRequester c6 a9803
  523. #pragma libcall IntuiSupBase IRemoveRequester cc 801
  524. #pragma libcall IntuiSupBase ICreateMenu d2 ba9805
  525. #pragma libcall IntuiSupBase IAttachMenu d8 9802
  526. #pragma libcall IntuiSupBase IMenuItemAddress de 802
  527. #pragma libcall IntuiSupBase IRemoveMenu e4 801
  528. #pragma libcall IntuiSupBase IFreeMenu ea 801
  529. #pragma libcall IntuiSupBase IOpenTextFile f0 210804
  530. #pragma libcall IntuiSupBase IReadTextLine f6 801
  531. #pragma libcall IntuiSupBase ICloseTextFile fc 801
  532. #pragma libcall IntuiSupBase IBuildLanguageTextArray 102 802
  533. #pragma libcall IntuiSupBase IGetLanguageText 108 9802
  534. #pragma libcall IntuiSupBase IFreeLanguageTextArray 10e 801
  535. #pragma libcall IntuiSupBase IChangeMousePointer 114 9802
  536. #pragma libcall IntuiSupBase IRestoreMousePointer 11a 801
  537. #pragma libcall IntuiSupBase IMoveMousePointer 120 210804
  538. #endif    /* LATTICE */
  539. #endif    /* AZTEC_C */
  540. #endif    /* __NO_PRAGMAS */
  541.  
  542. #endif    /* LIBRARIES_INTUISUP_H */
  543.